package com.hoshiicloud.user.param.usercenter;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户优惠券修改参数实体
 *
 * @author : yangcheng
 * @date : 2019/5/11 17:20
 * @mail : maiboyc@163.com
 **/
@ApiModel
@Data
public class MemberCouponUpdateParam {

    // ID
    @NotNull(message = "ID不能为空")
    @ApiModelProperty(name = "id", value = "ID", required = true, dataType = "java.lang.Long", example = "3171776001692664100")
    private Long id;

    // 用户主键ID
    @NotNull(message = "用户主键ID不能为空")
    @ApiModelProperty(name = "userId", value = "用户主键ID", required = true, dataType = "java.lang.Long", example = "3171776001692664000")
    private Long userId;

    // 优惠券编号
    @NotNull(message = "优惠券编号不能为空")
    @ApiModelProperty(name = "billno", value = "优惠券编号", required = true, dataType = "java.lang.String", example = "Y00001")
    private String billno;

    // 优惠券获取时间
    @NotNull(message = "优惠券获取时间不能为空")
    @ApiModelProperty(name = "billdate", value = "优惠券获取时间", required = true, dataType = "java.util.Date", example = "2019-05-04 10:01:25")
    private LocalDateTime billdate;

    // 有效期开始
    @NotNull(message = "有效期开始不能为空")
    @ApiModelProperty(name = "expiryfrom", value = "有效期开始", required = true, dataType = "java.util.Date", example = "2019-05-04 10:01:25")
    private LocalDateTime expiryfrom;

    // 有效期结束
    @NotNull(message = "有效期结束不能为空")
    @ApiModelProperty(name = "expiryto", value = "有效期结束", required = true, dataType = "java.util.Date", example = "2019-05-31 10:01:25")
    private LocalDateTime expiryto;

    // 券面值
    @NotNull(message = "券面值不能为空")
    @ApiModelProperty(name = "amount", value = "券面值", required = true, dataType = "java.math.BigDecimal", example = "100.00")
    private BigDecimal amount;

    // 来源  1-消费 2-活动 3-消费返回
    @NotNull(message = "来源不能为空")
    @ApiModelProperty(name = "source", value = "来源", required = true, dataType = "java.lang.Integer", example = "1")
    private Integer source;

    // 优惠券规则
    @NotNull(message = "优惠券规则不能为空")
    @ApiModelProperty(name = "genRule", value = "优惠券规则", required = true, dataType = "java.lang.String", example = "一次消费只能使用一张优惠卷，店铺优惠可以和优惠券叠加")
    private String genRule;

    // 使用说明，规则
    @NotNull(message = "使用说明不能为空")
    @ApiModelProperty(name = "instructions", value = "使用说明", required = true, dataType = "java.lang.String", example = "优惠券使用后，不可以退回，也不可以赠送")
    private String instructions;

    // 状态 1-有效 2-已过期   3-已作废 4- 已使用
    @NotNull(message = "状态不能为空")
    @ApiModelProperty(name = "status", value = "状态", required = true, dataType = "java.lang.Integer", example = "4")
    private Integer status;

    // 关联订单号
    @NotNull(message = "关联订单号不能为空")
    @ApiModelProperty(name = "reforderno", value = "关联订单号", required = true, dataType = "java.lang.String", example = "D0001")
    private String reforderno;

    // 使用时间
    @NotNull(message = "使用时间不能为空")
    @ApiModelProperty(name = "usedtime", value = "使用时间", required = true, dataType = "java.util.Date", example = "2019-05-10 12:04:35")
    private LocalDateTime usedtime;

}  